package com.ysd.lis.controller.lab;

import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabManufacturer;
import com.ysd.lis.request.qc.ManufacturerDto;
import com.ysd.lis.request.qc.ManufacturerPageParam;
import com.ysd.lis.service.lab.LabManufacturerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-02-02
 */
@Api(tags = "生产商")
@RestController
@RequestMapping("/lis/lab/manufacturer")
public class LabManufacturerController extends BaseController {

    @Autowired
    LabManufacturerService labManufacturerService;
    @ApiOperation("分页查询")
    @GetMapping("/findManufacturerPageList")
    public Result findManufacturerPageList(ManufacturerPageParam pageParam){
        return labManufacturerService.findManufacturerPageList(pageParam);
    }
    @ApiOperation("新增")
    @PostMapping("/addManufacturer")
    public Result addManufacturer(@RequestBody LabManufacturer manufacturer){
        return  labManufacturerService.addManufacturer(manufacturer);
    }

    @ApiOperation("修改")
    @PostMapping("/editManufacturer")
    public Result editManufacturer(@RequestBody LabManufacturer manufacturer) {
        return labManufacturerService.editManufacturer(manufacturer);
    }

    @ApiOperation("根据详情id删除详情数据")
    @PostMapping("/deleteManufacturer")
    public Result deleteManufacturer(@RequestBody LabManufacturer manufacturer) {
        return labManufacturerService.deleteManufacturer(manufacturer);
    }
    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteManufacturerList")
    public Result batchDeleteManufacturerList(@RequestBody ManufacturerDto dto){
        return  labManufacturerService.batchDeleteManufacturerList(dto);
    }



}
